//
//  DevicesView.swift
//  Kosspot
//
//  Created by 李鑫 on 2025/6/20.
//

import SwiftUI
import UTEBluetoothRYApi


struct DevicesView: View {
    @Binding var model: UTEModelDevice
    var body: some View {
            HStack () {
                Image("39")
                    .resizable()
                    .frame(width: 70,height: 70)
                    .padding(.leading,20)
                
                VStack(alignment: .leading, spacing: 12) {
                    Text(model.name)
                        .font(.system(size: 16, weight: .medium))
                        .foregroundStyle(Color(hex: "#FFFFFF"))
                    
                    Text("关联\("0")条运动记录")
                        .font(.system(size: 12))
                        .foregroundColor(Color(hex: "#00E9DA"))
                    
                    Text(model.name)
                        .font(.system(size: 16))
                        .foregroundColor(Color(hex: "#FFFFFF"))
                }
                Spacer()
                Image("xiangyou")
                    .frame(width: 24,height: 3)
                    .padding(.trailing,20)
            }
            .frame(height: 110)
            .gradientBackground(colors: [Color(hex: "#1E1E1E")],cornerRadius: 16)
            .padding(.leading, 12)
            .padding(.trailing, 12)
            .contentShape(Rectangle())
            .buttonStyle(PlainButtonStyle())
    }
}

//#Preview {
//    DevicesView()
//}



